<%@ include file="/en/jsp/static.jsp" %>
<%@ page import="java.util.*" %>
<%@ taglib uri="/linuxbox/common.tld" prefix="common" %>

<%
  String SUBJECT = (String) request.getAttribute("SUBJECT");
  String CONTENT = (String) request.getAttribute("CONTENT");
  int SUB_YEAR = Integer.parseInt((String) request.getAttribute("SUB_YEAR"));
  int SUB_MONTH = Integer.parseInt((String) request.getAttribute("SUB_MONTH"));
  int SUB_DAY = Integer.parseInt((String) request.getAttribute("SUB_DAY"));
  int EXP_YEAR = Integer.parseInt((String) request.getAttribute("EXP_YEAR"));
  int EXP_MONTH = Integer.parseInt((String) request.getAttribute("EXP_MONTH"));
  int EXP_DAY = Integer.parseInt((String) request.getAttribute("EXP_DAY"));
  int curYear = Calendar.getInstance().get(Calendar.YEAR);
  int ID = Integer.parseInt((String)request.getAttribute("ID"));
%>

<jsp:include page="/en/jsp/header.jsp" flush="true"/>
  <table width="100%" height=26 align=middle border=0 cellpadding=0 cellspacing=0 bgcolor="#f4f4f4" style="font-size:16px;color:#d05000">
    <tr>
      <td>
          &nbsp;<img src="<%=BoxStatic.imageDir%>itemball.jpg" width=14 height=15 border=0 align="absmiddle">
          <b><%=boxName%> - News Edit</b>
      </td>
      <td align=right>
        <a href="<%=BoxStatic.jspDir%>news/BoxNewsMt.jsp">
          News Maintenance
        </a>
      </td>
    </tr>
  </table>

  <hr width=\"100%\" color=#E06000 align=left>

  <table width= "100%" border=1 cellspacing=0 cellpadding=1>
    <tr><td>
      <table border=0 width="100%" bgcolor=#e0e0e0 style="font-size:14px">
        <form action="<%=BoxStatic.servletDir%>BoxNewsAction" method=post>
          <input type=hidden name=ID value=<%=ID%>>
          <tr><td>
            <b>Submit Date: </b>
              <select name="SUB_MONTH" size="1">
                <common:MonthList selected="<%=SUB_MONTH%>" allownull="false" />
              </select>
              <select name="SUB_DAY" size="1">
                <common:DayList selected="<%=SUB_DAY%>" allownull="false" />
              </select>
              <select name="SUB_YEAR" size="1">
                <common:YearList selected="<%=SUB_YEAR%>" allownull="false" />
              </select>
            <b>Expire Date:</b>
            <select name="EXP_MONTH" size="1">
              <common:MonthList selected="<%=EXP_MONTH%>" allownull="true" />
            </select>
            <select name="EXP_DAY" size="1">
              <common:DayList selected="<%=EXP_DAY%>" allownull="true" />
            </select>
            <select name="EXP_YEAR" size="1">
              <common:YearList selected="<%=EXP_YEAR%>" allownull="true" />
            </select>
          </td></tr>
          <tr><td>
            <b>Subject:</b><input type=text name=SUBJECT size=70 value="<%=SUBJECT%>">
          </td></tr>
          <tr><td>
            <b>Content:</b><br>
            <textarea name=CONTENT rows=10 cols=80><%=CONTENT%></textarea><br>
          </td></tr>
          <tr><td>
            <input type=submit value=
<%
      if (ID==0)
        out.println("\"Add\" name=SubmitSave");
      else
      {
        out.println("\"Update\" name=SubmitUpdate>");
        out.println("<input type=submit value=\"Delete\" name=SubmitDelete");
      }
%>
            >
            <input type=button value=Cancel onclick="window.history.go(-1)" >
          </td></tr>
        </form>
      </table>
    </td></tr>
  </table>

  <hr width=\"100%\" color=#E06000 align=left>

<jsp:include page="/en/jsp/footer.jsp" flush="true"/>
